package com.icss.th.common.util;

public class SecureUtil 
{
	/**
	 * 将密码转为openfire格式
	 * @param pass
	 * @return
	 */
	public static String encryptPassword(String pass)
	{
		if (StringUtil.isEmpty(pass)) return "";
		return new Blowfish("f359c34bc5b462a7").encryptString(pass);
	}
	
	/**
	 * 将openfire格式密码解码
	 * @param encryptPassword
	 * @return
	 */
	public static String decryptPassword(String encryptPassword)
	{
		if (StringUtil.isEmpty(encryptPassword)) return "";
		return new Blowfish("f359c34bc5b462a7").decryptString(encryptPassword);
	}
}
